<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue.js</title>
    <link rel="stylesheet" href="style.css">
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
    <div id="vue-app">
        <!-- 图片 -->
        <div id="bag" :class="{burst:ended}"></div>
        
        <!-- 进度情况 -->
        <div id="bag-health">
            <div :style="{width: health + '%'}"></div>
        </div>

        <!-- 控制按钮 -->
        <div id="controls">
            <button @click="punch" v-show="!ended">GO</button>
            <button @click="restart">Replay</button>
        </div>
    </div>

    <script src="app.js"></script>
</body>
</html>